<template>
  <a-modal
  width='1000px'
    v-model="userInfoVisible"
    title="个人资料"
    ok-text="确认"
    cancel-text="关闭"
    @ok="hideModal"
  >
    <a-form-model :model="form" :label-col="labelCol" :wrapper-col="wrapperCol">
      <a-form-model-item label="所属部门" required >
        <a-input v-model="form.name" />
      </a-form-model-item>
      <a-form-model-item label="证件号">
        <a-input v-model="form.name" />
      </a-form-model-item>
      <a-form-model-item label="姓名" required >
        <a-input v-model="form.name" />
      </a-form-model-item>
      <a-form-model-item label="用户名" required >
        <a-input v-model="form.name" />
      </a-form-model-item>
      <a-form-model-item label="性别">
        <a-radio-group v-model="form.resource">
          <a-radio value="0">男</a-radio>
          <a-radio value="1">女</a-radio>
        </a-radio-group>
      </a-form-model-item>
      <a-form-model-item label="生日">
        <a-date-picker v-model="form.date1" style="width:100%" />
      </a-form-model-item>
      <a-form-model-item label="职务">
        <a-input v-model="form.name" />
      </a-form-model-item>
      <a-form-model-item label="岗位">
        <a-input v-model="form.name" />
      </a-form-model-item>
      <a-form-model-item label="手机号">
        <a-input v-model="form.name" />
      </a-form-model-item>
      <a-form-model-item label="办公电话">
        <a-input v-model="form.name" />
      </a-form-model-item>
      <a-form-model-item label="传真">
        <a-input v-model="form.name" />
      </a-form-model-item>
      <a-form-model-item label="邮箱">
        <a-input v-model="form.name" />
      </a-form-model-item>
      <a-form-model-item :labelCol='{span:2}' :wrapperCol='{span:19}' style="width:100%" label="联系地址">
        <a-input v-model="form.name" />
      </a-form-model-item>
    </a-form-model>
  </a-modal>
</template>
<script>
export default {
  data() {
    return {
      userInfoVisible: false,
      labelCol: { span: 4 },
      wrapperCol: { span: 14 },
      form: {
        name: '',
        region: undefined,
        date1: undefined,
        delivery: false,
        type: [],
        resource: '',
        desc: ''
      }
    }
  },
  methods: {
    onSubmit() {
      console.log('submit!', this.form)
    },
    showModal() {
      this.userInfoVisible = true
    },
    hideModal() {
      this.userInfoVisible = false
    }
  }
}
</script>
<style lang="less" scoped>
.ant-form-item{
  width: 50%;
  display: inline-block;
}
/deep/.ant-modal-footer{
  text-align: center;
}
</style>